<?php
/**
 * CreateTime: 2023/11/21 14:36
 * User:LinQ
 */

namespace Database\Seeders\Database;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class RoleAuthSeeder extends Seeder
{
    public function run()
    {
        $isExists = DB::table('role_auth')->select('role_auth_id')->first();
        if(!$isExists){
            DB::table('role_auth')->insert(
               [
                   [
                       'role_id' => 1,
                       'auth_id' => 1,
                       'auth_value' => 15,
                       'created_at' => date("Y-m-d h:i:s"),
                       'updated_at' => date("Y-m-d h:i:s"),
                   ],
                   [
                       'role_id' => 1,
                       'auth_id' => 2,
                       'auth_value' => 1,
                       'created_at' => date("Y-m-d h:i:s"),
                       'updated_at' => date("Y-m-d h:i:s"),
                   ],
                   [
                       'role_id' => 1,
                       'auth_id' => 3,
                       'auth_value' => 3,
                       'created_at' => date("Y-m-d h:i:s"),
                       'updated_at' => date("Y-m-d h:i:s"),
                   ]
               ]
            );
        }
    }
}